package cn.sparrowx.cloud.common;

import feign.Feign;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * cn.sparrowx.cloud.config
 *
 * @author bosong
 * @since 2018/6/13 11:18.
 */
@Configuration
public class FeignConfiguration {
    @Bean
    @Scope("prototype")
    public Feign.Builder feignBuilder() {
        return Feign.builder();
    }

    @Bean
    public HystrixClientFallback fb() {
        return new HystrixClientFallback();
    }
}
